home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d18 / tp6map.arc / READ.ME < prev    next >
Text File  |  1991-02-23  |  5KB  |  113 lines

  1. TP6MAP - a partial map of the Borland Turbo Pascal 6.0 IDE
  2.  
  3. Prepared by D.J. Murdoch using TPMAPPER.
  4.  
  5.  
  6. Introduction
  7.  
  8. In pushing the new TurboVision library that comes with TP6,
  9. Borland advertises that the "Integrated Development Environment",
  10. or IDE, is written using TurboVision.  Unluckily for them, the
  11. Editors unit which is distributed with TP6 is very buggy; it was
  12. quickly clear to people that the editor in the IDE and the
  13. Editors unit are two different animals.
  14.  
  15. When this came out on Compuserve, Borland quickly "clarified"
  16. their claims: only the "user interface" parts of the IDE are
  17. actually written using TV; the Editors unit is a demonstration
  18. only; it's not the actual IDE editor, which is written in
  19. assembler.
  20.  
  21. The bugs in Editors had had me very worried.  It was clear that
  22. it hadn't really been tested properly; I didn't want to use other
  23. parts of TV that were similarly untested.  On the other hand, the
  24. IDE is relatively bug-free.  I wouldn't mind using code that was
  25. incorporated into it.  Which code was that?
  26.  
  27. I asked this question on Compuserve, and didn't get much of an
  28. answer, so the need for this project was born.  I decided to map
  29. TURBO.EXE, so that I could find out exactly what was in and what
  30. was out.
  31.  
  32.  
  33. How the map was created
  34.  
  35. I've written a program (TPMAPPER) that can read a .TPU file, and
  36. then go looking through a compiled .EXE file for the code.  It's
  37. much more successful than I would have guessed it would be - the
  38. map of TURBO.EXE that's included here is almost completely
  39. automatically generated, with only a bit of fussing on my part.
  40.  
  41. If you're interested in TPMAPPER, let me know.  I haven't decided
  42. if or how it will be distributed; chances are it won't be free,
  43. though.  If you're desperate for a copy, tell me how much you're
  44. willing to pay for it.
  45.  
  46.  
  47. How to read the map
  48.  
  49. Most of the map looks something like this extract:
  50.  
  51.   Offset     Address   Size  Name in file
  52.  
  53.   00003340   008C:0000       dos.swapvectors
  54.   0000BB00   0908:0000  000D overlay.blk0000
  55.   0001C12B   196A:0000       stddlg.iswild
  56.   0001C169   196A:0042  0151 Unrecognized
  57.  
  58. The first column gives an offset (in hex, starting from 0) within
  59. the TP 6.0 TURBO.EXE file.  (In case there's more than one
  60. version, mine is 325397 bytes and is dated 23 Oct 90, time
  61. 06:00:00.)  The second column is a guess at the corresponding
  62. address that a .MAP file produced by a compiler would produce;
  63. the first segment in the program is number 0000, and so on.  Most
  64. of TURBO.EXE is kept in overlays; for the overlay parts
  65. (everything after System), the segment part of this address is
  66. meaningless.
  67.  
  68. The next two columns depend on what sort of line it is.  Ones
  69. like the first one, with nothing in the Size column, give entry
  70. points to the code.  Many more names are given than a standard
  71. .MAP file would include; some are private, some aren't.  The
  72. "dot" syntax, where the unit name is followed by a dot and then
  73. the routine name, is used here.  Nested procedures get another
  74. dot and a name, as do methods within objects.
  75.  
  76. Lines like the second one are for "code blocks", not entry
  77. points.  If TPMAPPER couldn't attach a name, it shows the size of
  78. the code rather than the entry points.  The name given is the
  79. unit name and a block number; the numbers are the same as my
  80. INTRFC program would use.
  81.  
  82. Lines like the last one only show up in the stddlg unit.  It
  83. appears that the version of stddlg used in TURBO.EXE isn't quite
  84. the same as the one distributed for us to use; when there's some
  85. code there that doesn't match what's in the .TPU, it's shown as
  86. "Unrecognized".  I've only looked at one of these blocks, and it
  87. looked as though the only difference was the values being used
  88. for some constants like cmFileOpen, but I wouldn't trust that to
  89. be the only change unless I checked everything very carefully.
  90.  
  91.  
  92. What to do with the map
  93.  
  94. If you're not just curious the way I was, the next most likely
  95. thing you might want to do with this map is to use it to find
  96. patch points.  I've done that once for someone; it was relatively
  97. easy to change the IDE cursor so that in insert mode it was a
  98. block, and in overwrite mode a line.  (The idea was to switch the
  99. functions of views.tview.blockcursor and
  100. views.tview.normalcursor.)
  101.  
  102. If you can tell me some other good use for this map, I'd like to
  103. hear about it.
  104.  
  105. Duncan Murdoch
  106. 24 Feb 1991
  107.  
  108. DJ Murdoch at Fidonet point node 1:221/177.40
  109. Internet address dmurdoch@watstat.waterloo.edu
  110. Compuserve address 71631,122
  111.  
  112. Postal address:  79 John St. W, Waterloo, Ontario, Canada, N2L 1B7
  113.